<head>
	<!--
		=================================================================================================
		Copyright (c) 2012 Athena Health. 
		This software is the proprietary information of Athena Health
		All Right Reserved.
		Repository path:    $HeadURL: http://athena-call-routing.googlecode.com/svn/trunk/ola.php $
		Last committed:     $Revision: 45 $
		Last changed by:    $Author: davidjmorin@gmail.com $
		Last changed date:    $Date: 2012-07-02 21:10:12 -0400 (Mon, 02 Jul 2012) $
		ID:            $Id: index.php 45 2012-07-03 01:10:12Z davidjmorin@gmail.com $
		=================================================================================================
	-->
	<style type="text/css">
		body {background-color:#42520e; color:#f0cb01;}
		th {background: URL(http://www.athenahealth.com/_img/boxes/carousel_bg.png);}
		p {color:blue;}
		.data{
		width: 400px;
		position: absolute;
		right: 200;
		top: 60;
		
		}
		a:link {color: #f0cb01; text-decoration: underline; }
		a:active {color: #f0cb01; text-decoration: underline; }
		a:visited {color: #f0cb01; text-decoration: underline; }
		a:hover {color: #f0cb01; text-decoration: none; }
		
	</style>
	
	<SCRIPT>
		function popUp(page,PWidth,PHeight,id) {
			eval("designerwiz"+id+"=window.open('"+page+"','designerwiz1','toolbar=0,scrollbars=1,location=0,status=0,menubars=0,resizable=1,width="+PWidth+",height="+PHeight+"')")
			eval;("wiz"+id+".window.moveTo((screen.width/2)-(PWidth/2),(screen.height/2)-(PHeight/2))")
		}
	</SCRIPT>
</head>
<a href="index.php">Back to Resource Page</a>
<?php
	
	//SVN Version 10...COMMIT 6/30 
	
	define("HOST", "localhost");
	
	// Database user
	define("DBUSER", "root");
	
	// Database password
	define("PASS", "123456");
	
	// Database name
	define("DB", "bbpinpal_article");
	
	############## Make the mysql connection ###########
	
	$conn = mysql_connect(HOST, DBUSER, PASS) or  die('Could not connect !<br />Please contact the site\'s administrator.');
	
	$db = mysql_select_db(DB) or  die('Could not connect to database !<br />Please contact the site\'s administrator.');
	$id = $_GET['id']; 
	
	//$query = mysql_query(" SELECT * FROM athena WHERE keyword='".$_POST['value']."' ");
	$query = mysql_query("SELECT * FROM ola WHERE block='{$id}'");
?>
<div>
	<br />Searching for topics related to <b><?php echo "$id"; ?></b>
	<?php
		echo "<table border='.5' color='#fff' width='700px'>
		<tr>
		<th bgcolor='#42520e' style='font-size:18px; color:#fff;'>Name</th>
		<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>WebEx ?</th>
		<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>Hours</th>
		<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>Specialty/Area</th>
		<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>Team</th>
		<th bgcolor='#42520e'style='font-size:18px; color:#fff;'>Block</th>
		
		</tr>";
		
		while ($data = mysql_fetch_array($query)) {
			
			echo '
			<tr style="background-color:#576c11;">
			<td style="font-size:18px; color:#f0cb01;">'.$data["name"].'</td>
			<td style="font-size:18px;color:#f0cb01;">'.$data["webex"].'</td>
			<td style="font-size:18px;color:#f0cb01;">'.$data["hours"].'</td>
			<td style="font-size:18px;color:#f0cb01;">'.$data["spec_area"].'</td>
			<td style="font-size:18px;color:#f0cb01;">'.$data["team"].'</td>
			<td style="font-size:18px;color:#f0cb01;">'.$data["block"].'</td>
			
			
			
			
			</tr>';
			
		}
		
		echo '</table>';
		
	?>
	<div class="data">
		<?php
			
			mysql_select_db("bbpinpal_article", $conn);
			if ($id=="Block 1")
			{
				$result = mysql_query("SELECT * FROM ola_desc WHERE block='Block 1'");
				
				while($row = mysql_fetch_array($result))
				{
					
					//echo $row['block'] . " " . $row['desc'];
					//echo "<br />";
					echo $row['url'];
				}
			}
			
			
			
			if ($id=="Block 3")
			{
				$result = mysql_query("SELECT * FROM ola_desc where block='Block 3'");
				
				while($row = mysql_fetch_array($result))
				{
					
					//echo $row['block'] . " " . $row['desc'];
					//echo "<br />";;
					echo $row['url'];
				}
			}
			
			if ($id=="Block 4")
			{
				$result = mysql_query("SELECT * FROM ola_desc where block='Block 4'");
				
				while($row = mysql_fetch_array($result))
				{
					
					//echo $row['block'] . " " . $row['desc'];
					//echo "<br />";;
					echo $row['url'];
				}
			}
			
			if ($id=="Block 5")
			{
				$result = mysql_query("SELECT * FROM ola_desc where block='Block 5'");
				
				while($row = mysql_fetch_array($result))
				{
					
					//echo $row['block'] . " " . $row['desc'];
					//echo "<br />";;
					echo $row['url'];
					
					//Edits Made 6/30
				}
			}
		?>
	</div>
	
</div>

